OpenGL invalid operation after Qt 5.4.1 upgrade to 5.7.0 (glGetError 1282) 您所在的位置:网站首页 glgeterror 1282 OpenGL invalid operation after Qt 5.4.1 upgrade to 5.7.0 (glGetError 1282)

OpenGL invalid operation after Qt 5.4.1 upgrade to 5.7.0 (glGetError 1282)

#OpenGL invalid operation after Qt 5.4.1 upgrade to 5.7.0 (glGetError 1282) | 来源: 网络整理| 查看: 265

I met similar problem. In my case, the problem is caused by NULL opengl context in QQuickView's scene graph. After scene graph initialized successfully, the QOpenGLContext::currentContext() is still NULL. With NULL openglContext(), the gl functions failed and get error GL_INVALID_OPERATION.

My solution is to create an opengl context to enable the gl functions. Make sure you share the context if you use the initialized textures, vertex buffers, etc. in other renderer with default qt provided opengl context.

Actually the opengl context behaves quite different in Qt 5.7.0 than Qt 5.4.1. As far as I understand from Qt Document, the multiple QQuickWindow instance should use the same opengl context. And in Qt 5.4.1, it is the case. But in Qt 5.7.0, it seems that each QQuickWindow has its own opengl context, thus I got the error "Cannot make QOpenGLContext current in a different thread". I hope some one can answer my question.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有